home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2000 #4 / Amiga Plus CD - 2000 - No. 4.iso / Tools / Commo-Support / Disk-Archive / includes-1_4.dms / includes-1_4.adf / doc.zoo / layers.doc < prev    next >
Encoding:
Text File  |  1989-12-20  |  28.4 KB  |  1,102 lines

  1.  
  2.  
  3. TABLE OF CONTENTS
  4.  
  5. layers.library/BeginUpdate
  6. layers.library/BehindLayer
  7. layers.library/CreateBehindHookLayer
  8. layers.library/CreateBehindLayer
  9. layers.library/CreateUpfrontHookLayer
  10. layers.library/CreateUpfrontLayer
  11. layers.library/DeleteLayer
  12. layers.library/DisposeLayerInfo
  13. layers.library/EndUpdate
  14. layers.library/FattenLayerInfo
  15. layers.library/InitLayers
  16. layers.library/InstallClipRegion
  17. layers.library/InstallLayerHook
  18. layers.library/LockLayer
  19. layers.library/LockLayerInfo
  20. layers.library/LockLayers
  21. layers.library/MoveLayer
  22. layers.library/MoveLayerInFrontOf
  23. layers.library/MoveSizeLayer
  24. layers.library/NewLayerInfo
  25. layers.library/ScrollLayer
  26. layers.library/SizeLayer
  27. layers.library/SwapBitsRastPortClipRect
  28. layers.library/ThinLayerInfo
  29. layers.library/UnlockLayer
  30. layers.library/UnlockLayerInfo
  31. layers.library/UnlockLayers
  32. layers.library/UpfrontLayer
  33. layers.library/WhichLayer
  34.  
  35.  
  36. layers.library/BeginUpdate                           layers.library/BeginUpdate
  37.  
  38.     NAME
  39.     BeginUpdate -- Prepare to repair damaged layer.
  40.  
  41.     SYNOPSIS
  42.     result = BeginUpdate( l )
  43.     d0                    a0
  44.  
  45.     BOOLEAN result;
  46.     struct Layer *l;
  47.  
  48.     FUNCTION
  49.     Convert damage list to ClipRect list and swap in for
  50.     programmer to redraw through. This routine simulates
  51.     the ROM library environment. The idea is to only render in the
  52.     "damaged" areas, saving time over redrawing all of the layer.
  53.     The layer is locked against changes made by the layer library.
  54.  
  55.     INPUTS
  56.     l - pointer to a layer
  57.  
  58.     RESULTS
  59.     result - TRUE if damage list converted to ClipRect list sucessfully.
  60.          FALSE if list conversion aborted. (probably out of memory)
  61.  
  62.     BUGS
  63.     If BeginUpdate returns FALSE, programmer must abort the attempt to
  64.     refresh this layer and instead call EndUpdate( l, FALSE ) to restore
  65.     original ClipRect and damage list.
  66.  
  67.     SEE ALSO
  68.     EndUpdate, graphics/layers.h, graphics/clip.h
  69.  
  70.  
  71. layers.library/BehindLayer                           layers.library/BehindLayer
  72.  
  73.     NAME
  74.     BehindLayer -- Put layer behind other layers.
  75.  
  76.     SYNOPSIS
  77.     result = BehindLayer( dummy, l )
  78.     d0              a0     a1
  79.  
  80.     BOOLEAN result;
  81.     LONG dummy;
  82.     struct Layer *l;
  83.  
  84.     FUNCTION
  85.     Move this layer to the most behind position swapping bits 
  86.     in and out of the display with other layers.
  87.     If other layers are REFRESH then collect their damage lists and 
  88.     set the LAYERREFRESH bit in the Flags fields of those layers that
  89.     may be revealed.  If this layer is a backdrop layer then
  90.     put this layer behind all other backdrop layers.
  91.     If this layer is NOT a backdrop layer then put in front of the
  92.     top backdrop layer and behind all other layers.
  93.  
  94.     Note: this operation may generate refresh events in other layers
  95.        associated with this layer's Layer_Info structure.
  96.  
  97.     INPUTS
  98.     dummy - unused
  99.     l - pointer to a layer 
  100.  
  101.     RESULTS
  102.     result - TRUE    if operation successful 
  103.          FALSE   if operation unsuccessful (probably out of memory)
  104.  
  105.     BUGS
  106.  
  107.     SEE ALSO
  108.        graphics/layers.h, graphics/clip.h
  109.  
  110.  
  111. layers.library/CreateBehindHookLayer
  112.  
  113.     NAME
  114.     CreateBehindHookLayer -- Create a new layer behind all existing layers,
  115.                  using supplied callback BackFill hook.
  116.  
  117.     SYNOPSIS
  118.     result = CreateBehindHookLayer(li,bm,x0,y0,x1,y1,flags,hook,[,bm2])
  119.     d0                             a0 a1 d0 d1 d2 d3   d4  a3   [ a2 ]
  120.  
  121.     struct Layer *result;
  122.     struct Layer_Info *li;
  123.     struct BitMap *bm;
  124.     LONG x0,y0,x1,y1;
  125.     LONG flags;
  126.     struct Hook *hook;
  127.     struct BitMap *bm2;
  128.  
  129.     FUNCTION
  130.     Create a new Layer of position and size (x0,y0)->(x1,y1)
  131.     Make this layer of type found in flags.
  132.     Install Layer->BackFill callback Hook.
  133.     If SuperBitMap, use bm2 as pointer to real SuperBitMap,
  134.     and copy contents of Superbitmap into display layer.
  135.     If this layer is a backdrop layer then place it behind all
  136.     other layers including other backdrop layers. If this is
  137.     not a backdrop layer then place it behind all nonbackdrop
  138.     layers.
  139.  
  140.     Note: when using SUPERBITMAP, you should also set LAYERSMART flag.
  141.  
  142.     INPUTS
  143.     li - pointer to LayerInfo structure
  144.     bm - pointer to common BitMap used by all Layers
  145.     x0,y0 -    upper left hand corner of layer
  146.     x1,y1 -    lower right hand corner of layer
  147.     flags -    various types of layers supported as bit sets.
  148.         (for bit definitions, see graphics/layers.h )
  149.     hook -    Layer->BackFill callback Hook which will be called 
  150.         with object == (struct RastPort *) result->RastPort
  151.         and message == [ (Layer *) layer, (struct Rectangle) bounds, 
  152.                   (WORD) offsetx, (WORD) offsety ]
  153.     bm2 - pointer to optional Super BitMap
  154.  
  155.     RESULTS
  156.     result - pointer to Layer structure if successful
  157.          NULL if not successful
  158.  
  159.     BUGS
  160.  
  161.     SEE ALSO
  162.     DeleteLayer, graphics/layers.h, graphics/clip.h, graphics/gfx.h
  163.     utility/hooks.h
  164.  
  165.  
  166. layers.library/CreateBehindLayer               layers.library/CreateBehindLayer
  167.  
  168.     NAME
  169.     CreateBehindLayer -- Create a new layer behind all existing layers.
  170.  
  171.     SYNOPSIS
  172.     result = CreateBehindLayer(li,bm,x0,y0,x1,y1,flags [,bm2])
  173.     d0                         a0 a1 d0 d1 d2 d3   d4  [ a2 ]
  174.  
  175.     struct Layer *result;
  176.     struct Layer_Info *li;
  177.     struct BitMap *bm;
  178.     LONG x0,y0,x1,y1;
  179.     LONG flags;
  180.     struct BitMap *bm2;
  181.  
  182.     FUNCTION
  183.     Create a new Layer of position and size (x0,y0)->(x1,y1)
  184.     Make this layer of type found in flags.
  185.     If SuperBitMap, use bm2 as pointer to real SuperBitMap,
  186.     and copy contents of Superbitmap into display layer.
  187.     If this layer is a backdrop layer then place it behind all
  188.     other layers including other backdrop layers. If this is
  189.     not a backdrop layer then place it behind all nonbackdrop
  190.     layers.
  191.  
  192.     Note: when using SUPERBITMAP, you should also set LAYERSMART flag.
  193.  
  194.     INPUTS
  195.     li - pointer to LayerInfo structure
  196.     bm - pointer to common BitMap used by all Layers
  197.     x0,y0 -    upper left hand corner of layer
  198.     x1,y1 -    lower right hand corner of layer
  199.     flags -    various types of layers supported as bit sets.
  200.         (for bit definitions, see graphics/layers.h )
  201.     bm2 - pointer to optional Super BitMap
  202.  
  203.     RESULTS
  204.     result - pointer to Layer structure if successful
  205.          NULL if not successful
  206.  
  207.     BUGS
  208.  
  209.     SEE ALSO
  210.     DeleteLayer, graphics/layers.h, graphics/clip.h, graphics/gfx.h
  211.  
  212.  
  213. layers.library/CreateUpfrontHookLayer
  214.  
  215.     NAME
  216.     CreateUpfrontHookLayer -- Create a new layer on top of existing layers,
  217.                   using supplied callback BackFill hook.
  218.  
  219.     SYNOPSIS
  220.     result = CreateUpfrontHookLayer(li,bm,x0,y0,x1,y1,flags,hook,[,bm2])
  221.     d0                    a0 a1 d0 d1 d2 d3   d4  a3   [ a2 ]
  222.  
  223.     struct Layer *result;
  224.     struct Layer_Info *li;
  225.     struct BitMap *bm;
  226.     LONG x0,y0,x1,y1;
  227.     LONG flags;
  228.     struct Hook *hook;
  229.     struct BitMap *bm2;
  230.  
  231.     FUNCTION
  232.     Create a new Layer of position and size (x0,y0)->(x1,y1)
  233.     and place it on top of all other layers.
  234.     Make this layer of type found in flags
  235.     Install Layer->BackFill callback hook.
  236.     if SuperBitMap, use bm2 as pointer to real SuperBitMap.
  237.     and copy contents of Superbitmap into display layer.
  238.  
  239.     Note: when using SUPERBITMAP, you should also set LAYERSMART flag.
  240.  
  241.     INPUTS
  242.     li - pointer to LayerInfo structure
  243.     bm - pointer to common BitMap used by all Layers
  244.     x0,y0 -    upper left hand corner of layer
  245.     x1,y1 - lower right hand corner of layer
  246.     flags -    various types of layers supported as bit sets.
  247.     hook -    Layer->BackFill callback Hook which will be called 
  248.         with object == (struct RastPort *) result->RastPort
  249.         and message == [ (Layer *) layer, (struct Rectangle) bounds, 
  250.                   (WORD) offsetx, (WORD) offsety ]
  251.     bm2 - pointer to optional Super BitMap
  252.  
  253.     RESULTS
  254.     result - pointer to Layer structure if successful
  255.          NULL if not successful
  256.  
  257.     BUGS
  258.  
  259.     SEE ALSO
  260.        DeleteLayer, graphics/layers.h, graphics/clip.h, graphics/gfx.h
  261.     utility/hooks.h
  262.  
  263.  
  264. layers.library/CreateUpfrontLayer             layers.library/CreateUpfrontLayer
  265.  
  266.     NAME
  267.     CreateUpfrontLayer -- Create a new layer on top of existing layers.
  268.  
  269.     SYNOPSIS
  270.     result = CreateUpfrontLayer(li,bm,x0,y0,x1,y1,flags [,bm2])
  271.     d0                a0 a1 d0 d1 d2 d3   d4  [ a2 ]
  272.  
  273.     struct Layer *result;
  274.     struct Layer_Info *li;
  275.     struct BitMap *bm;
  276.     LONG x0,y0,x1,y1;
  277.     LONG flags;
  278.     struct BitMap *bm2;
  279.  
  280.     FUNCTION
  281.     Create a new Layer of position and size (x0,y0)->(x1,y1)
  282.     and place it on top of all other layers.
  283.     Make this layer of type found in flags
  284.     if SuperBitMap, use bm2 as pointer to real SuperBitMap.
  285.     and copy contents of Superbitmap into display layer.
  286.  
  287.     Note: when using SUPERBITMAP, you should also set LAYERSMART flag.
  288.  
  289.     INPUTS
  290.     li - pointer to LayerInfo structure
  291.     bm - pointer to common BitMap used by all Layers
  292.     x0,y0 -    upper left hand corner of layer
  293.     x1,y1 - lower right hand corner of layer
  294.     flags -    various types of layers supported as bit sets.
  295.     bm2 - pointer to optional Super BitMap
  296.  
  297.     RESULTS
  298.     result - pointer to Layer structure if successful
  299.          NULL if not successful
  300.  
  301.     BUGS
  302.  
  303.     SEE ALSO
  304.        DeleteLayer, graphics/layers.h, graphics/clip.h, graphics/gfx.h
  305.  
  306.  
  307. layers.library/DeleteLayer                           layers.library/DeleteLayer
  308.  
  309.     NAME
  310.     DeleteLayer -- delete layer from layer list.
  311.  
  312.     SYNOPSIS
  313.     result = DeleteLayer( dummy, l )
  314.     d0                    a0,    a1
  315.  
  316.     BOOLEAN result;
  317.     LONG dummy;
  318.     struct Layer *l;
  319.  
  320.     FUNCTION
  321.     Remove this layer from the list of layers.  Release memory
  322.     associated with it.  Restore other layers that may have been
  323.     obscured by it.  Trigger refresh in those that may need it.
  324.     If this is a superbitmap layer make sure SuperBitMap is current.
  325.     The SuperBitMap is not removed from the system but is available
  326.     for program use even though the rest of the layer information has
  327.     been deallocated.
  328.  
  329.     INPUTS
  330.     dummy - unused
  331.     l - pointer to a layer
  332.  
  333.     RESULTS
  334.     result - TRUE if this layer successfully deleted from the system
  335.          FALSE if layer not deleted. (probably out of memory )
  336.  
  337.     BUGS
  338.  
  339.     SEE ALSO
  340.     graphics/layers.h, graphics/clip.h
  341.  
  342.  
  343. layers.library/DisposeLayerInfo                 layers.library/DisposeLayerInfo
  344.  
  345.     NAME
  346.     DisposeLayerInfo -- Return all memory for LayerInfo to memory pool
  347.  
  348.     SYNOPSIS
  349.     DisposeLayerInfo(li)
  350.              a0
  351.  
  352.     struct Layer_Info *li;
  353.  
  354.     FUNCTION
  355.     return LayerInfo and any other memory attached to this LayerInfo
  356.     to memory allocator.
  357.  
  358.     Note: if you wish to delete the layers associated with this Layer_Info
  359.         structure, remember to call DeleteLayer() for each of the layers
  360.         before calling DisposeLayerInfo().
  361.  
  362.     INPUTS
  363.     li - pointer to LayerInfo structure
  364.  
  365.     EXAMPLE
  366.  
  367.     -- delete the layers associated this Layer_Info structure -- 
  368.  
  369.     DeleteLayer(li,simple_layer);
  370.     DeleteLayer(li,smart_layer);
  371.  
  372.     -- see documentation on DeleteLayer about deleting SuperBitMap layers --
  373.     my_super_bitmap_ptr = super_layer->SuperBitMap;
  374.     DeleteLayer(li,super_layer);
  375.  
  376.     -- now dispose of the Layer_Info structure itself -- 
  377.     DisposeLayerInfo(li);
  378.     
  379.  
  380.     BUGS
  381.  
  382.     SEE ALSO
  383.     DeleteLayer, graphics/layers.h
  384.  
  385.  
  386. layers.library/EndUpdate                               layers.library/EndUpdate
  387.  
  388.     NAME
  389.     EndUpdate -- remove damage list and restore state of layer to normal.
  390.  
  391.     SYNOPSIS
  392.     EndUpdate( l, flag )
  393.            a0  d0
  394.  
  395.     struct Layer *l;
  396.     USHORT flag;
  397.  
  398.     FUNCTION
  399.     After the programmer has redrawn his picture he calls this
  400.     routine to restore the ClipRects to point to his standard
  401.     layer tiling. The layer is then unlocked for access by the
  402.     layer library.
  403.  
  404.     Note: use flag = FALSE if you are only making a partial update.
  405.         You may use the other region functions (graphics functions such as 
  406.         OrRectRegion, AndRectRegion, and XorRectRegion ) to clip adjust
  407.         the DamageList to reflect a partial update.
  408.  
  409.     INPUTS
  410.     l - pointer to a layer
  411.     flag - use TRUE if update was completed. The damage list is cleared.
  412.            use FALSE if update not complete. The damage list is retained.
  413.  
  414.     EXAMPLE
  415.  
  416.     -- begin update for first part of two-part refresh -- 
  417.     BeginUpdate(my_layer);
  418.  
  419.     -- do some refresh, but not all --
  420.     my_partial_refresh_routine(my_layer);
  421.  
  422.     -- end update, false (not completely done refreshing yet) --
  423.     EndUpdate(my_layer, FALSE);
  424.  
  425.     -- begin update for last part of refresh -- 
  426.     BeginUpdate(my_layer);
  427.  
  428.     -- do rest of refresh -- 
  429.     my_complete_refresh_routine(my_layer);
  430.  
  431.     -- end update, true (completely done refreshing now) --
  432.     EndUpdate(my_layer, TRUE);
  433.  
  434.     BUGS
  435.  
  436.     SEE ALSO 
  437.     BeginUpdate, graphics/layers.h, graphics/clip.h
  438.  
  439.  
  440. layers.library/FattenLayerInfo                   layers.library/FattenLayerInfo
  441.  
  442.     NAME
  443.     FattenLayerInfo -- convert 1.0 LayerInfo to 1.1 LayerInfo
  444.     OBSOLETE OBSOLETE OBSOLETE OBSOLETE OBSOLETE
  445.  
  446.     SYNOPSIS
  447.     OBSOLETE OBSOLETE OBSOLETE OBSOLETE OBSOLETE
  448.     FattenLayerInfo(li)
  449.             a0
  450.  
  451.     struct Layer_Info *li;
  452.     OBSOLETE OBSOLETE OBSOLETE OBSOLETE OBSOLETE
  453.  
  454.     FUNCTION
  455.     V1.1 software and any later releases need to have more info in the 
  456.     Layer_Info structure. To do this in a 1.0 supportable manner requires
  457.     allocation and deallocation of the memory whenever most
  458.     layer library functions are called.  To prevent unnecessary
  459.     allocation/deallocation FattenLayerInfo will preallocate the
  460.     necessary data structures and fake out the layer library into
  461.     thinking it has a LayerInfo gotten from NewLayerInfo.
  462.     NewLayerInfo is the approved method for getting this structure.
  463.     When a program needs to give up the LayerInfo structure it
  464.     must call ThinLayerInfo before freeing the memory. ThinLayerInfo
  465.     is not necessary if New/DisposeLayerInfo are used however.
  466.  
  467.     INPUTS
  468.     li - pointer to LayerInfo structure
  469.  
  470.     BUGS
  471.  
  472.     SEE ALSO
  473.  
  474.     NewLayerInfo, ThinLayerInfo, DisposeLayerInfo, graphics/layers.h
  475.  
  476.  
  477. layers.library/InitLayers                             layers.library/InitLayers
  478.  
  479.     NAME
  480.     InitLayers -- Initialize Layer_Info structure
  481.     OBSOLETE OBSOLETE OBSOLETE OBSOLETE OBSOLETE
  482.  
  483.     SYNOPSIS
  484.     OBSOLETE OBSOLETE OBSOLETE OBSOLETE OBSOLETE
  485.     InitLayers(li)
  486.            a0
  487.  
  488.     struct Layer_Info *li;
  489.     OBSOLETE OBSOLETE OBSOLETE OBSOLETE OBSOLETE
  490.  
  491.     FUNCTION
  492.     Initialize Layer_Info structure in preparation to use
  493.     other layer operations on this list of layers.
  494.     Make the Layers unlocked (open), available to layer operations.
  495.  
  496.     INPUTS
  497.     li - pointer to LayerInfo structure
  498.  
  499.     BUGS
  500.  
  501.     SEE ALSO
  502.     NewLayerInfo, DisposeLayerInfo, graphics/layers.h
  503.  
  504.  
  505. layers.library/InstallClipRegion               layers.library/InstallClipRegion
  506.  
  507.     NAME
  508.     InstallClipRegion -- Install clip region in layer
  509.  
  510.     SYNOPSIS
  511.     oldclipregion = InstallClipRegion( l,  region )
  512.     d0                   a0  a1
  513.  
  514.     struct Region *oldclipregion;
  515.     struct Layer *l;
  516.     struct Region *region;
  517.  
  518.     FUNCTION
  519.     Installs a transparent Clip region in the layer. All 
  520.     subsequent graphics calls will be clipped to this region.
  521.     You MUST remember to call InstallClipRegion(l,NULL) before
  522.     calling DeleteLayer(l) or the Intuition function CloseWindow()
  523.      if you have installed a non-NULL ClipRegion in l.
  524.  
  525.     INPUTS
  526.     l - pointer to a layer
  527.     region - pointer to a region
  528.  
  529.     RESULTS
  530.     oldclipregion - The pointer to the previous ClipRegion that
  531.         was installed. Returns NULL if no previous ClipRegion installed.
  532.  
  533.         Note: If the system runs out of memory while computing the
  534.         resulting ClipRects the LAYERS_CLIPRECTS_LOST bit will
  535.         be set in l->Flags.
  536.  
  537.     BUGS
  538.     If the system runs out of memory during normal layer operations,
  539.     the ClipRect list may get swept away and not restored.
  540.     As soon as there is enough memory and the layer library 
  541.     gets called again the ClipRect list will be rebuilt.
  542.  
  543.     SEE ALSO
  544.     BeginUpdate EndUpdate,
  545.     graphics/layers.h, graphics/clip.h, graphics/regions.h
  546.  
  547.  
  548. layers.library/InstallLayerHook                 layers.library/InstallLayerHook
  549.  
  550.     NAME
  551.     InstallLayerHook -- safely install a new Layer->BackFill hook.
  552.  
  553.     SYNOPSIS
  554.     oldhook = InstallLayerHook( layer, hook )
  555.     d0                          a0     a1
  556.  
  557.     struct Hook  *oldhook;
  558.     struct Layer *layer;
  559.     struct Hook  *hook;
  560.  
  561.     FUNCTION
  562.     Installs a new Layer->Backfill Hook, waiting until it is safe to do
  563.     so. Locks the layer while substituting the new Hook and removing the
  564.     old one. If a new Hook is not provided, will install the default layer
  565.     BackFill Hook.
  566.  
  567.     INPUTS
  568.     layer - pointer to the layer in which to install the Backfill Hook.
  569.     hook -    pointer to layer callback Hook which will be called 
  570.         with object == (struct RastPort *) result->RastPort
  571.         and message == [ (Layer *) layer, (struct Rectangle) bounds, 
  572.                   (WORD) offsetx, (WORD) offsety ]
  573.     
  574.         This hook should fill the Rectangle in the RastPort
  575.         with the BackFill pattern appropriate for offset x/y.
  576.  
  577.         If this hook pointer is NULL, the function installs
  578.         the "default" Layers BackFill Hook into this Layer.
  579.  
  580.     RESULTS
  581.     oldhook - pointer to the Layer->BackFill Hook that was previously
  582.           active.
  583.  
  584.     BUGS
  585.  
  586.     SEE ALSO
  587.     graphics/clip.h utility/hooks.h
  588.  
  589.  
  590. layers.library/LockLayer                               layers.library/LockLayer
  591.  
  592.     NAME
  593.     LockLayer -- Lock layer to make changes to ClipRects.
  594.  
  595.     SYNOPSIS  
  596.     LockLayer( dummy, l ) 
  597.            a0     a1  
  598.   
  599.     LONG dummy;
  600.     struct Layer *l;
  601.  
  602.     FUNCTION  
  603.     Make this layer unavailable for other tasks to use.
  604.     If another task is already using this layer then wait for
  605.     it to complete and then reserve the layer for your own use.
  606.     (this function does the same thing as graphics.library/LockLayerRom)
  607.  
  608.     Note: if you wish to lock MORE THAN ONE layer at a time, you 
  609.         must call LockLayerInfo() before locking those layers and
  610.         then call UnlockLayerInfo() when you have finished. This
  611.         is to prevent system "deadlocks".
  612.  
  613.     Further Note: while you hold the lock on a layer, Intuition will block
  614.         on operations such as windowsizing, dragging, menus, and depth
  615.         arranging windows in this layer's screen.  It is recommended that
  616.         YOU do not make Intuition function calls while the layer is locked.
  617.         
  618.     INPUTS
  619.     dummy - unused
  620.     l - pointer to a layer 
  621.  
  622.     BUGS
  623.  
  624.     SEE ALSO  
  625.     UnlockLayer, LockLayerInfo, UnlockLayerInfo,
  626.     graphics.library/LockLayerRom, graphics/layers.h, graphics/clip.h
  627.  
  628.  
  629. layers.library/LockLayerInfo                       layers.library/LockLayerInfo
  630.  
  631.     NAME
  632.     LockLayerInfo -- Lock the LayerInfo structure.
  633.  
  634.     SYNOPSIS
  635.     LockLayerInfo( li )
  636.                a0
  637.  
  638.     struct Layer_Info *li;
  639.  
  640.     FUNCTION
  641.     Before doing an operation that requires the LayerInfo
  642.     structure, make sure that no other task is also using the
  643.     LayerInfo structure.  LockLayerInfo() returns when the 
  644.     LayerInfo belongs to this task.  There should be 
  645.     an UnlockLayerInfo for every LockLayerInfo. 
  646.  
  647.     Note: All layer routines presently LockLayerInfo() when they 
  648.     start up and UnlockLayerInfo() as they exit.  Programmers 
  649.     will need to use these Lock/Unlock routines if they wish 
  650.     to do something with the LayerStructure that is not 
  651.     supported by the layer library.
  652.  
  653.     INPUTS
  654.     li - pointer to Layer_Info structure
  655.  
  656.     BUGS
  657.  
  658.     SEE ALSO
  659.     UnlockLayerInfo, graphics/layers.h 
  660.  
  661.  
  662. layers.library/LockLayers                             layers.library/LockLayers
  663.  
  664.     NAME
  665.     LockLayers -- lock all layers from graphics output.
  666.  
  667.     SYNOPSIS   
  668.     LockLayers( li )
  669.             a0
  670.  
  671.     struct Layer_Info *li;
  672.  
  673.     FUNCTION   
  674.     First calls LockLayerInfo()
  675.     Make all layers in this layer list locked.
  676.  
  677.     INPUTS   
  678.     li - pointer to Layer_Info structure  
  679.  
  680.     BUGS
  681.  
  682.     SEE ALSO   
  683.     LockLayer, LockLayerInfo, graphics/layers.h
  684.  
  685.  
  686. layers.library/MoveLayer                               layers.library/MoveLayer
  687.   
  688.     NAME
  689.     MoveLayer -- Move layer to new position in BitMap.
  690.   
  691.     SYNOPSIS
  692.     result = MoveLayer( dummy, l, dx, dy ) 
  693.     d0            a0     a1 d0  d1
  694.  
  695.     BOOLEAN result;
  696.     LONG dummmy;
  697.     struct Layer *l;
  698.     LONG dx,dy;
  699.  
  700.     FUNCTION
  701.     Move this layer to new position in shared BitMap.
  702.     If any refresh layers become revealed, collect damage and
  703.     set REFRESH bit in layer Flags.
  704.  
  705.     INPUTS  
  706.     dummy - unused
  707.     l - pointer to a nonbackdrop layer 
  708.     dx - delta to add to current x position
  709.     dy - delta to add to current y position
  710.  
  711.     RETURNS
  712.     result - TRUE if operation successful
  713.          FALSE if failed (out of memory)
  714.  
  715.     BUGS
  716.     May not handle (dx,dy) which attempts to move the layer ouside the
  717.     layer's RastPort->BitMap bounds .
  718.  
  719.     SEE ALSO
  720.     graphics/layers.h, graphics/clip.h 
  721.  
  722.  
  723. layers.library/MoveLayerInFrontOf             layers.library/MoveLayerInFrontOf
  724.  
  725.     NAME
  726.    MoveLayerInFrontOf-- Put layer in front of another layer.
  727.  
  728.     SYNOPSIS
  729.    result = MoveLayerInFrontOf( layertomove, targetlayer )
  730.                     a0           a1
  731.    BOOLEAN result;
  732.    struct Layer *layertomove;
  733.    struct Layer *targetlayer;
  734.  
  735.     FUNCTION
  736.    Move this layer in front of target layer, swapping bits
  737.    in and out of the display with other layers.
  738.    If this is a refresh layer then collect damage list and
  739.    set the LAYERREFRESH bit in layer->Flags if redraw required.
  740.    
  741.    Note: this operation may generate refresh events in other layers
  742.       associated with this layer's Layer_Info structure.
  743.  
  744.     INPUTS
  745.    layertomove - pointer to layer which should be moved
  746.    targetlayer - pointer to target layer in front of which to move layer
  747.  
  748.     RESULTS
  749.    result = TRUE    if operation successful
  750.         FALSE   if operation unsuccessful (probably out of memory)
  751.  
  752.     BUGS
  753.  
  754.     SEE ALSO
  755.    graphics/layers.h
  756.  
  757.  
  758. layers.library/MoveSizeLayer                       layers.library/MoveSizeLayer
  759.   
  760.     NAME
  761.     MoveSizeLayer -- Position/Size layer
  762.   
  763.     SYNOPSIS
  764.     result = MoveLayer( layer, dx, dy, dw, dh )
  765.     d0            a0     d0  d1  d2  d3
  766.  
  767.     BOOLEAN result;
  768.     struct Layer *l;
  769.     LONG dx,dy,dw,dh;
  770.  
  771.     FUNCTION
  772.     Change upperleft and lower right position of Layer.
  773.  
  774.     INPUTS  
  775.     dummy - unused
  776.     l - pointer to a nonbackdrop layer 
  777.     dx,dy - change upper left corner by (dx,dy)
  778.     dw,dy - change size by (dw,dh)
  779.  
  780.     RETURNS
  781.     result - TRUE if operation successful
  782.          FALSE if failed (due to out of memory)
  783.          FALSE if failed (due to illegal layer->bounds)
  784.  
  785.     BUGS
  786.  
  787.     SEE ALSO
  788.     graphics/layers.h, graphics/clip.h 
  789.  
  790.  
  791. layers.library/NewLayerInfo                         layers.library/NewLayerInfo
  792.  
  793.     NAME
  794.     NewLayerInfo -- Allocate and Initialize full Layer_Info structure.
  795.  
  796.     SYNOPSIS
  797.     result = NewLayerInfo()
  798.     d0
  799.  
  800.     struct Layer_Info *result;
  801.  
  802.     FUNCTION
  803.     Allocate memory required for full Layer_Info structure.
  804.     Initialize Layer_Info structure in preparation to use
  805.     other layer operations on this list of layers.
  806.     Make the Layer_Info unlocked (open).
  807.  
  808.     INPUTS
  809.     None
  810.  
  811. RESULT
  812.     result- pointer to Layer_Info structure if successful
  813.         NULL if not enough memory
  814.  
  815. BUGS
  816.  
  817. SEE ALSO
  818.     graphics/layers.h
  819.  
  820.  
  821. layers.library/ScrollLayer                           layers.library/ScrollLayer
  822.     
  823.     NAME
  824.     ScrollLayer -- Scroll around in a superbitmap, translate coordinates
  825.                       in non-superbitmap layer.
  826.     
  827.     SYNOPSIS    
  828.     ScrollLayer( dummy, l, dx, dy )   
  829.              a0     a1 d0  d1  
  830.  
  831.     LONG dummy;
  832.     struct Layer *l;
  833.     LONG dx,dy;
  834.  
  835.     FUNCTION
  836.     For a SuperBitMap Layer:
  837.     Update the SuperBitMap from the layer display, then copy bits
  838.     between Layer and SuperBitMap to reposition layer over different
  839.     portion of SuperBitMap.
  840.     For nonSuperBitMap layers, all (x,y) pairs are adjusted by
  841.     the scroll(x,y) value in the layer.  To cause (0,0) to actually
  842.     be drawn at (3,10) use ScrollLayer(-3,-10). This can be useful
  843.     along with InstallClipRegion to simulate Intuition GZZWindows
  844.     without the overhead of an extra layer.
  845.  
  846.     INPUTS
  847.     dummy - unused
  848.     l - pointer to a layer   
  849.     dx - delta to add to current x scroll value
  850.     dy - delta to add to current y scroll value
  851.  
  852.     BUGS
  853.     May not handle (dx,dy) which attempts to move the layer ouside the
  854.     layer's SuperBitMap bounds.
  855.  
  856.     SEE ALSO
  857.     graphics/layers.h
  858.  
  859.  
  860. layers.library/SizeLayer                               layers.library/SizeLayer
  861.  
  862.     NAME
  863.     SizeLayer -- Change the size of this nonbackdrop layer.
  864.  
  865.     SYNOPSIS
  866.     result = SizeLayer( dummy, l, dx, dy )  
  867.     d0            a0     a1 d0  d1 
  868.  
  869.     BOOLEAN result;
  870.     LONG dummy;
  871.     struct Layer *l;
  872.     LONG dx, dy;
  873.  
  874.     FUNCTION
  875.     Change the size of this layer by (dx,dy). The lower right hand
  876.     corner is extended to make room for the larger layer.
  877.     If there is SuperBitMap for this layer then copy pixels into
  878.     or out of the layer depending on whether the layer increases or
  879.     decreases in size.  Collect damage list for those layers that may
  880.     need to be refreshed if damage occurred.
  881.  
  882.     INPUTS
  883.     dummy - unused
  884.     l - pointer to a nonbackdrop layer  
  885.     dx - delta to add to current x size
  886.     dy - delta to add to current y size
  887.  
  888.     RESULTS
  889.     result - TRUE if operation successful
  890.          FALSE if failed (out of memory)
  891.  
  892.     BUGS
  893.  
  894.     SEE ALSO
  895.     graphics/layers.h, graphics/clip.h
  896.  
  897.  
  898. layers.library/SwapBitsRastPortClipRect
  899.  
  900.     NAME
  901.     SwapBitsRastPortClipRect -- Swap bits between common bitmap 
  902.                     and obscured ClipRect
  903.  
  904.     SYNOPSIS
  905.     SwapBitsRastPortClipRect( rp, cr )
  906.                   a0  a1
  907.  
  908.     struct RastPort *rp;
  909.     struct ClipRect *cr;
  910.  
  911.     FUNCTION
  912.     Support routine useful for those that need to do some
  913.     operations not done by the layer library.  Allows programmer
  914.     to swap the contents of a small BitMap with a subsection of
  915.     the display. This is accomplished without using extra memory.
  916.     The bits in the display RastPort are exchanged with the
  917.     bits in the ClipRect's BitMap.
  918.  
  919.     Note: the ClipRect structures which the layer library allocates are
  920.     actually a little bigger than those described in the graphics/clip.h
  921.     include file.  So be warned that it is not a good idea to have
  922.     instances of cliprects in your code.
  923.  
  924.     INPUTS
  925.        rp - pointer to rastport
  926.        cr - pointer to cliprect to swap bits with
  927.  
  928.     BUGS
  929.  
  930.     SEE ALSO
  931.     graphics/clip.h, graphics/rastport.h, graphics/clip.h
  932.  
  933.  
  934. layers.library/ThinLayerInfo                       layers.library/ThinLayerInfo
  935.  
  936.     NAME
  937.     ThinLayerInfo -- convert 1.1 LayerInfo to 1.0 LayerInfo.
  938.     OBSOLETE OBSOLETE OBSOLETE OBSOLETE OBSOLETE
  939.  
  940.     SYNOPSIS
  941.     OBSOLETE OBSOLETE OBSOLETE OBSOLETE OBSOLETE
  942.     ThinLayerInfo(li)
  943.               a0
  944.  
  945.     struct Layer_Info *li;
  946.     OBSOLETE OBSOLETE OBSOLETE OBSOLETE OBSOLETE
  947.  
  948.     FUNCTION
  949.     return the extra memory needed that was allocated with
  950.     FattenLayerInfo. This is must be done prior to freeing
  951.     the Layer_Info structure itself. V1.1 software should be
  952.     using DisposeLayerInfo.
  953.  
  954.     INPUTS
  955.     li - pointer to LayerInfo structure
  956.  
  957.     BUGS
  958.  
  959.     SEE ALSO
  960.     DisposeLayerInfo, FattenLayerInfo, graphics/layers.h
  961.  
  962.  
  963. layers.library/UnlockLayer                           layers.library/UnlockLayer
  964.    
  965.     NAME
  966.     UnlockLayer -- Unlock layer and allow graphics routines to use it.
  967.  
  968.     SYNOPSIS
  969.     UnlockLayer( l )  
  970.              a0
  971.  
  972.     struct Layer *l;
  973.  
  974.     FUNCTION   
  975.     When finished changing the ClipRects or whatever you were
  976.     doing with this layer you must call UnlockLayer() to allow
  977.     other tasks to proceed with graphic output to the layer.
  978.   
  979.     INPUTS
  980.     l - pointer to a layer
  981.  
  982.     BUGS
  983.  
  984.     SEE ALSO   
  985.     graphics/layers.h, graphics/clip.h
  986.  
  987.  
  988. layers.library/UnlockLayerInfo                   layers.library/UnlockLayerInfo
  989.  
  990.     NAME 
  991.     UnlockLayerInfo -- Unlock the LayerInfo structure.
  992.  
  993.     SYNOPSIS 
  994.     UnlockLayerInfo( li ) 
  995.              a0 
  996.  
  997.     struct Layer_Info *li;
  998.  
  999.     FUNCTION 
  1000.     After the operation is complete that required a LockLayerInfo,
  1001.     unlock the LayerInfo structure so that  other tasks may
  1002.     affect the layers.
  1003.  
  1004.     INPUTS 
  1005.     li - pointer to the Layer_Info structure 
  1006.  
  1007.      BUGS
  1008.  
  1009.      SEE ALSO
  1010.     LockLayerInfo, graphics/layers.h  
  1011.  
  1012.  
  1013. layers.library/UnlockLayers                         layers.library/UnlockLayers
  1014.     
  1015.     NAME    
  1016.     UnlockLayers -- Unlock all layers from graphics output.
  1017.             Restart graphics output to layers that have been waiting
  1018.    
  1019.     SYNOPSIS    
  1020.     UnlockLayers( li )
  1021.               a0
  1022.  
  1023.     struct Layer_Info *li;
  1024.  
  1025.     FUNCTION    
  1026.     Make all layers in this layer list unlocked.
  1027.     Then call UnlockLayerInfo
  1028.    
  1029.     INPUTS    
  1030.     li - pointer to the Layer_Info structure   
  1031.   
  1032.     BUGS
  1033.  
  1034.     SEE ALSO
  1035.     LockLayers, UnlockLayer, graphics/layers.h
  1036.  
  1037.  
  1038. layers.library/UpfrontLayer                         layers.library/UpfrontLayer
  1039.  
  1040.     NAME
  1041.     UpfrontLayer -- Put layer in front of all other layers.
  1042.  
  1043.     SYNOPSIS
  1044.     result = UpfrontLayer( dummy, l )
  1045.     do               a0  a1
  1046.  
  1047.     BOOLEAN result;
  1048.     LONG dummy;
  1049.     struct Layer *l;
  1050.  
  1051.     FUNCTION
  1052.     Move this layer to the most upfront position swapping bits
  1053.     in and out of the display with other layers.
  1054.     If this is a refresh layer then collect damage list and
  1055.     set the LAYERREFRESH bit in layer->Flags if redraw required.
  1056.     By clearing the BACKDROP bit in the layers Flags you may
  1057.     bring a Backdrop layer up to the front of all other layers.
  1058.  
  1059.     Note: this operation may generate refresh events in other layers
  1060.        associated with this layer's Layer_Info structure.
  1061.  
  1062.     INPUTS
  1063.     dummy - unused
  1064.     l - pointer to a nonbackdrop layer
  1065.  
  1066.     RESULTS
  1067.     result - TRUE    if operation successful
  1068.          FALSE    if operation unsuccessful (probably out of memory)
  1069.  
  1070.     BUGS
  1071.  
  1072.     SEE ALSO
  1073.     graphics/layers.h
  1074.  
  1075.  
  1076. layers.library/WhichLayer                             layers.library/WhichLayer
  1077.  
  1078.     NAME
  1079.     WhichLayer -- Which Layer is this point in?
  1080.  
  1081.     SYNOPSIS
  1082.     layer = WhichLayer( li, x, y )
  1083.     d0            a0  d0 d1
  1084.  
  1085.     FUNCTION
  1086.     Starting at the topmost layer check to see if this point (x,y)
  1087.         occurs in this layer.  If it does return the pointer to this
  1088.         layer. Return NULL if there is no layer at this point.
  1089.  
  1090.     INPUTS
  1091.     li  = pointer to LayerInfo structure
  1092.     (x,y)    = coordinate in the BitMap
  1093.  
  1094.     RESULTS
  1095.     layer - pointer to the topmost layer that this point is in
  1096.         NULL if this point is not in a layer
  1097.  
  1098.     SEE ALSO
  1099.     graphics/layers.h
  1100.  
  1101.  
  1102.